Tegra: platform: support Tegra186 chip id
authorVarun Wadekar <[email protected]>
Thu, 13 Apr 2017 21:12:49 +0000 (14:12 -0700)
committerVarun Wadekar <[email protected]>
Thu, 13 Apr 2017 21:16:14 +0000 (14:16 -0700)
This patch adds support to read the chip id and identify if
the current platform is Tegra186.

Signed-off-by: Varun Wadekar <[email protected]>
plat/nvidia/tegra/common/tegra_platform.c
plat/nvidia/tegra/include/tegra_platform.h

index 0724b18ee26cdc197852506a6961adfaa63638dd..18cc555cfb5ee77d8d0331ab0ae9ff7c24b3d5b5 100644 (file)
@@ -69,6 +69,7 @@ typedef enum tegra_platform {
 typedef enum tegra_chipid {
        TEGRA_CHIPID_TEGRA13 = 0x13,
        TEGRA_CHIPID_TEGRA21 = 0x21,
+       TEGRA_CHIPID_TEGRA18 = 0x18,
 } tegra_chipid_t;
 
 /*
@@ -109,6 +110,13 @@ uint8_t tegra_chipid_is_t210(void)
        return (chip_id == TEGRA_CHIPID_TEGRA21);
 }
 
+uint8_t tegra_chipid_is_t186(void)
+{
+       uint32_t chip_id = (tegra_get_chipid() >> CHIP_ID_SHIFT) & CHIP_ID_MASK;
+
+       return (chip_id == TEGRA_CHIPID_TEGRA18);
+}
+
 /*
  * Read the chip ID value and derive the platform
  */
index a2813a832903f2a35bb0786db09bf42a25d32878..c06ce70ef509d3ed5f11144aba94e38744e26d66 100644 (file)
@@ -42,8 +42,10 @@ uint32_t tegra_get_chipid_minor(void);
 /*
  * Tegra chip identifiers
  */
-uint8_t tegra_is_t132(void);
-uint8_t tegra_is_t210(void);
+uint8_t tegra_chipid_is_t132(void);
+uint8_t tegra_chipid_is_t210(void);
+uint8_t tegra_chipid_is_t186(void);
+
 
 /*
  * Tegra platform identifiers